package com.ice.app.base.config;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component;

import com.ice.app.system.config.service.ConfigService;

/**
 * 初始化任务
 * 系统启动后自动执行
 * @author Palo
 *
 */
@Component
@Order(value = 1)   //执行顺序控制
public class InitJobConfig implements ApplicationRunner{
	
	@Autowired
	private ConfigService configService;

    @Override
    public void run(ApplicationArguments applicationArguments) throws Exception {
    	// 初始化资源放在这里
    	configService.cacheConfig();
    }
    
}